/*
 * SlotMachineInterface.java
 * Author: Ben Gentry
 * Completed: 28 June, 2012
 * Revised: Adam Wilford 6/30/2012
 * 
 * Purpose: This module provides the functionality needed to read from the 
 * payout table.
 */
package slotMachinePackage;

import java.io.BufferedReader;
import java.io.FileReader;

public class SlotMachine {

    //payout values from the payout table are read into this array
    static int[] payoutTable = new int[1000];
    
    
    static void payoutTable(){
        
        String[] temp;

         try{
            //csv file containing data
            String csvFile = "payout.csv";

            //create BufferedReader to read csv file
            BufferedReader br = new BufferedReader( new FileReader(csvFile));
            String strLine = "";

            int lineNumber = 0;

            //read through the csv payout table and add to the payoutTable array
            while( (strLine = br.readLine()) != null)
            {
                   payoutTable[lineNumber] = Integer.parseInt(strLine);
                   lineNumber++;
            }
         }
        catch(Exception e){
            System.out.println("Exception while reading csv file: " + e);                  
        }
    }
}
